//
//  GFDetailCollectionViewCell.m
//  Qyer
//
//  Created by dlios on 15/10/19.
//  Copyright (c) 2015年 GF. All rights reserved.
//

#import "GFDetailCollectionViewCell.h"

@implementation GFDetailCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _allIamge = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, (SCREEN_WIDTH - 30) / 2, 230 * HEIGHT)];
        [self addSubview:_allIamge];
        
        _name_zh_cnLable = [[UILabel alloc] initWithFrame:CGRectMake(5 * WIDTH, 5 * HEIGHT, (SCREEN_WIDTH - 40 * HEIGHT) / 2, 12 * HEIGHT)];
        [_name_zh_cnLable setFont:[UIFont systemFontOfSize:WIDTH * 12.]];
        [_name_zh_cnLable setTextColor:[NightMode shareNightModeHandle].wordColor];
        [self addSubview:_name_zh_cnLable];
        
        _name_enLable = [[UILabel alloc] initWithFrame:CGRectMake(5 * WIDTH, 17 * HEIGHT, (SCREEN_WIDTH - 40 * HEIGHT) / 2, 12 * HEIGHT)];
        [_name_enLable setFont:[UIFont systemFontOfSize:WIDTH * 10.]];
        [_name_enLable setTextColor:[NightMode shareNightModeHandle].grayWordColor];
        [self addSubview:_name_enLable];
        
        _poi_countLable = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_WIDTH - 200 * WIDTH) / 4, 200 * HEIGHT, 80 * WIDTH, 20 * HEIGHT)];
        [_poi_countLable setFont:[UIFont systemFontOfSize:WIDTH * 12.]];
        [_poi_countLable setTextColor:[NightMode shareNightModeHandle].wordColor];
        [self addSubview:_poi_countLable];
    }
    return self;
}

- (void)setJnModel:(GFJnModel *)model{
    [_allIamge sd_setImageWithURL:[NSURL URLWithString:model.image_url] placeholderImage:[UIImage imageNamed:@"zw.png"]];
    [_name_zh_cnLable setText: model.name_zh_cn];
    [_name_enLable setText:model.name_en];
    NSString *hasString = @"旅行地";
    NSString *comString = [NSString stringWithFormat:@"%@%@", model.poi_countt, hasString];
    [_poi_countLable setText:comString];
}
@end
